
#@layout()
#define css()
#@layout_css?()
<link rel="stylesheet" href="#(CPATH)/static/components/datepicker/css/bootstrap-datepicker3.min.css">
<link rel="stylesheet" href="#(CPATH)/static/components/jquery-file-upload/css/jquery.fileupload.css">
<style>
	#uploader {
		height: 230px;
	}
	.myPanel {
		font-size: 25px;
		color: #ccc;
		text-align: center;
		padding-top: 60px;
	}
</style>
#end
#define script()
<script src="#(CPATH)/static/components/ckeditor/ckeditor.js"></script>
<script src="#(CPATH)/static/components/jquery-file-upload/js/vendor/jquery.ui.widget.js"></script>
<script src="#(CPATH)/static/components/jquery-file-upload/js/jquery.iframe-transport.js"></script>
<script src="#(CPATH)/static/components/jquery-file-upload/js/jquery.fileupload.js"></script>
#@layout_script?()
<script src="#(CPATH)/static/components/datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="#(CPATH)/static/components/datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script>
    $("input[hint='date']").datepicker({
        format: 'yyyy-mm-dd',
        language: 'zh-CN'
    });

  function doSubmit() {
    ajaxSubmit("#form", function (data) {
        $("#content").val(data.msg);
    })
  }

    $("#submit").on("click", function () {
        doSubmit();
    })

    </script>
#end


#define content()

<div class="content-wrapper">

    <section class="content-header">
        <h1>
			SQL控制台
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-header ">
                        <h3 class="box-title"></h3>
                    </div>
                    <form class="form-horizontal form-setting" autocomplete="off"
                          action="/admin/sql/ex"
                          method="POST" id="form">

						<div class="form-group">
							<label class="col-sm-2 control-label">执行语句</label>
							<div class="col-sm-6">
                                <textarea class="form-control" name="sql"></textarea>
							</div>
						</div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">执行结果</label>
                            <div class="col-sm-6">
                                <textarea id="content" class="form-control"></textarea>
                            </div>
                        </div>

					</form>
				</div>
				<!-- /.box-body -->
				<div class="box-footer">
					<div class="col-sm-offset-2 col-sm-10 submit-block">
						<div class="box-submit">
							<button id="submit" type="button" class="btn btn-primary">提交</button>
						</div>
					</div>
				</div>
                        <!-- /.box-footer -->
                    </form>
                </div>
            </div>
        </div>

    </section>

</div>
#end
